<template>
    <div>
        <el-row>
            <el-col :span="24" class="main-title main-v-center">
                我的资料
            </el-col>
        </el-row>
        <el-row>
            <el-col :span="24" class="main-h-center">
                <el-card style="width:400px;margin-top:50px;" shadow="never">
                    <!-- <div v-for="item of infoArr">
                        {{item}}
                    </div> -->
                    <el-row :gutter="10">
                        <el-col :span="6"><span class="head-text">账户类型：</span></el-col>
                        <el-col :span="18">管理员</el-col>
                    </el-row>
                    <el-row :gutter="10">
                        <el-col :span="6"><span class="head-text">账户名称：</span></el-col>
                        <el-col :span="18">{{user.username}}</el-col>
                    </el-row>
                    <el-row :gutter="10">
                        <el-col :span="6"><span class="head-text">账户积分：</span></el-col>
                        <el-col :span="18">{{user.integral}}</el-col>
                    </el-row>
                    <el-row :gutter="10">
                        <el-col :span="6"><span class="head-text">注册时间：</span></el-col>
                        <el-col :span="18">{{$utils.formatDateTime(user.add_time)}}</el-col>
                    </el-row>
                    <el-row :gutter="10">
                        <el-col :span="6"><span class="head-text">上次登录：</span></el-col>
                        <el-col :span="18">{{$utils.formatDateTime(user.last_login_time)}}</el-col>
                    </el-row>
                </el-card>
            </el-col>
        </el-row>
    </div>
</template>
<script>
    import {mapGetters} from "vuex";

    export default {
        data() {
            return {};
        },
        computed: {
            ...mapGetters(["user"]),
            userType() {
                if (this.user.level == 0) return "管理员";
                else if (this.user.level == 1) return "总代理";
                else if (this.user.level == 2) return "经销商";
            }
        }
    };
</script>
<style scoped>

    .head-text {
        float: right;
        color: #99a9bf;
    }
</style>


